
package entity;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

/**
 *
 * @author wangbh
 */
public class UserDbMapper implements RowMapper<User>{

    public User mapRow(ResultSet rs, int i) throws SQLException {
        User user = new User();
        user.setAge(rs.getString("age"));
        user.setName(rs.getString("name"));
        return user;
    }

}
